<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.ux.grid.filter.Filter.html" ext:member="" ext:cls="Ext.ux.grid.filter.Filter">Filter</a>
  <img src="resources/elbow-end.gif">StringFilter</pre></div><h1>Class <a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">Ext.ux.grid.filter.StringFilter</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.ux.grid.filter</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">StringFilter.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/StringFilter.html#cls-Ext.ux.grid.filter.StringFilter">StringFilter</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.ux.grid.filter.Filter.html" ext:cls="Ext.ux.grid.filter.Filter" ext:member="">Filter</a></td></tr></table><div class="description">Filter by a configurable Ext.form.TextField
<p><b><u>Example Usage:</u></b></p>
<pre><code><b>var</b> filters = <b>new</b> Ext.ux.grid.GridFilters({
    ...
    filters: [{
        <i>// required configs</i>
        type: <em>'string'</em>,
        dataIndex: <em>'name'</em>,
        
        <i>// optional configs</i>
        value: <em>'foo'</em>,
        active: true, <i>// <b>default</b> is false</i>
        iconCls: <em>'ux-gridfilter-text-icon'</em> <i>// <b>default</b></i>
        <i>// any Ext.form.TextField configs accepted</i>
    }]
});</code></pre></div><div class="hr"></div><a id="Ext.ux.grid.filter.StringFilter-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-active"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-active">active</a></b> : Boolean<div class="mdesc">Indicates the initial status of the filter (defaults to false).</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#active" ext:member="#active" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-dataIndex"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-dataIndex">dataIndex</a></b> : String<div class="mdesc"><div class="short">The Ext.data.Store dataIndex of the field this filter represents.
The dataIndex does not actually have to exist in th...</div><div class="long">The <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> dataIndex of the field this filter represents.
The dataIndex does not actually have to exist in the store.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#dataIndex" ext:member="#dataIndex" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-iconCls"></a><b><a href="source/StringFilter.html#cfg-Ext.ux.grid.filter.StringFilter-iconCls">iconCls</a></b> : String<div class="mdesc">The iconCls to be applied to the menu item.
Defaults to <tt>'ux-gridfilter-text-icon'</tt>.</div></td><td class="msource">StringFilter</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-iconCls"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.filter.StringFilter-iconCls">iconCls</a></b> : String<div class="mdesc">The iconCls to be applied to the menu item.
Defaults to <tt>'ux-gridfilter-text-icon'</tt>.</div></td><td class="msource">StringFilter</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-updateBuffer"></a><b><a href="source/Filter.html#cfg-Ext.ux.grid.filter.Filter-updateBuffer">updateBuffer</a></b> : Number<div class="mdesc"><div class="short">Number of milliseconds to wait after user interaction to fire an update. Only supported 
by filters: 'list', 'numeric...</div><div class="long">Number of milliseconds to wait after user interaction to fire an update. Only supported 
by filters: 'list', 'numeric', and 'string'. Defaults to 500.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#updateBuffer" ext:member="#updateBuffer" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-active"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-active">active</a></b> : Boolean<div class="mdesc">True if this filter is active.  Use setActive() to alter after configuration.</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#active" ext:member="#active" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-getSerialArgs"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-getSerialArgs">getSerialArgs</a></b> : Object<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
get and return serialized filter data for transmission...</div><div class="long">Template method to be implemented by all subclasses that is to
get and return serialized filter data for transmission to the server.
Defaults to Ext.emptyFn.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#getSerialArgs" ext:member="#getSerialArgs" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-init"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-init">init</a></b> : Object<div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
initialize the filter and install required menu items....</div><div class="long">Template method to be implemented by all subclasses that is to
initialize the filter and install required menu items.
Defaults to Ext.emptyFn.</div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#init" ext:member="#init" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="property-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-menu"></a><b><a href="source/Filter.html#prop-Ext.ux.grid.filter.Filter-menu">menu</a></b> : Ext.menu.Menu<div class="mdesc">The filter configuration menu that will be installed into the filter submenu of a column menu.</div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#menu" ext:member="#menu" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-destroy"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-destroy">destroy</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Destroys this filter by purging any event listeners, and removing any menus.</div><div class="long">Destroys this filter by purging any event listeners, and removing any menus.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#destroy" ext:member="#destroy" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-getValue"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-getValue">getValue</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Object</span><div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
get and return the value of the filter.
Defaults to Ex...</div><div class="long">Template method to be implemented by all subclasses that is to
get and return the value of the filter.
Defaults to Ext.emptyFn.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">The 'serialized' form of this filter</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#getValue" ext:member="#getValue" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-isActivatable"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-isActivatable">isActivatable</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Boolean</span><div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
return true if the filter has enough configuration inf...</div><div class="long">Template method to be implemented by all subclasses that is to
return <tt>true</tt> if the filter has enough configuration information to be activated.
Defaults to <tt>return true</tt>.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#isActivatable" ext:member="#isActivatable" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-serialize"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-serialize">serialize</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Object/Array</span><div class="mdesc"><div class="short">Returns the serialized filter data for transmission to the server
and fires the 'serialize' event.</div><div class="long">Returns the serialized filter data for transmission to the server
and fires the 'serialize' event.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object/Array</code><div class="sub-desc">An object or collection of objects containing
key value pairs representing the current configuration of the filter.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#serialize" ext:member="#serialize" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-setActive"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-setActive">setActive</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Boolean&nbsp;active</span><span class="comma">,&nbsp;</span><span title="Required" class="required">Boolean&nbsp;suppressEvent</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Sets the status of the filter and fires the appropriate events.</div><div class="long">Sets the status of the filter and fires the appropriate events.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>active</code> : Boolean<div class="sub-desc">The new filter state.</div></li><li><code>suppressEvent</code> : Boolean<div class="sub-desc">True to prevent events from being fired.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#setActive" ext:member="#setActive" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-setValue"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.Filter-setValue">setValue</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Object&nbsp;data</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Template method to be implemented by all subclasses that is to
set the value of the filter and fire the 'update' even...</div><div class="long">Template method to be implemented by all subclasses that is to
set the value of the filter and fire the 'update' event.
Defaults to Ext.emptyFn.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>data</code> : Object<div class="sub-desc">The value to set the filter</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#setValue" ext:member="#setValue" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.StringFilter-validateRecord"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.filter.StringFilter-validateRecord">validateRecord</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Ext.data.Record&nbsp;record</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">Boolean</span><div class="mdesc"><div class="short">Template method that is to validate the provided Ext.data.Record
against the filters configuration.</div><div class="long">Template method that is to validate the provided Ext.data.Record
against the filters configuration.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>record</code> : Ext.data.Record<div class="sub-desc">The record to validate</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">true if the record is valid within the bounds
of the filter, false otherwise.</div></li></ul></div></div></div></td><td class="msource">StringFilter</td></tr></tbody></table><a id="Ext.ux.grid.filter.StringFilter-events"></a><h2>Public Events</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Event</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-activate"></a><b class="event"><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-activate">activate</a></b><span class="colon">&nbsp;:&nbsp;</span><span class="openparen">(&nbsp;</span><span title="Required" class="required">Ext.ux.grid.filter.Filter&nbsp;this</span><span class="closeparen">&nbsp;)</span><span>&nbsp;</span><div class="mdesc"><div class="short">Fires when an inactive filter becomes active</div><div class="long">Fires when an inactive filter becomes active<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#activate" ext:member="#activate" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-deactivate"></a><b class="event"><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-deactivate">deactivate</a></b><span class="colon">&nbsp;:&nbsp;</span><span class="openparen">(&nbsp;</span><span title="Required" class="required">Ext.ux.grid.filter.Filter&nbsp;this</span><span class="closeparen">&nbsp;)</span><span>&nbsp;</span><div class="mdesc"><div class="short">Fires when an active filter becomes inactive</div><div class="long">Fires when an active filter becomes inactive<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#deactivate" ext:member="#deactivate" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-serialize"></a><b class="event"><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-serialize">serialize</a></b><span class="colon">&nbsp;:&nbsp;</span><span class="openparen">(&nbsp;</span><span title="Required" class="required">Array/Object&nbsp;data</span><span class="comma">,&nbsp;</span><span title="Required" class="required">Ext.ux.grid.filter.Filter&nbsp;filter</span><span class="closeparen">&nbsp;)</span><span>&nbsp;</span><div class="mdesc"><div class="short">Fires after the serialization process. Use this to attach additional parameters to serialization
data before it is en...</div><div class="long">Fires after the serialization process. Use this to attach additional parameters to serialization
data before it is encoded and sent to the server.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>data</code> : Array/Object<div class="sub-desc">A map or collection of maps representing the current filter configuration.</div></li><li><code>filter</code> : Ext.ux.grid.filter.Filter<div class="sub-desc">The filter being serialized.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#serialize" ext:member="#serialize" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.filter.Filter-update"></a><b class="event"><a href="source/Filter.html#event-Ext.ux.grid.filter.Filter-update">update</a></b><span class="colon">&nbsp;:&nbsp;</span><span class="openparen">(&nbsp;</span><span title="Required" class="required">Ext.ux.grid.filter.Filter&nbsp;this</span><span class="closeparen">&nbsp;)</span><span>&nbsp;</span><div class="mdesc"><div class="short">Fires when a filter configuration has changed</div><div class="long">Fires when a filter configuration has changed<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>this</code> : Ext.ux.grid.filter.Filter<div class="sub-desc">The filter object.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.ux.grid.filter.Filter.html#update" ext:member="#update" ext:cls="Ext.ux.grid.filter.Filter">Filter</a></td></tr></tbody></table></div>